package com.example.demo01.demo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;

import java.util.List;

/**
 * @Description:
 * @author: zhangshiwei
 * @date: 2021年11月02日 20:10
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class FlowChartVO {

    private List<Node> nodes;

    private List<Edge> edges;

    @Getter
    @Setter
    @ToString
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class Node {

        private String id;

        private String label;

        @JsonProperty("type")
        @JsonInclude(JsonInclude.Include.NON_NULL)
        private String type;

        @JsonProperty("flag")
        @JsonInclude(JsonInclude.Include.NON_NULL)
        private String flag;
    }

    @Getter
    @Setter
    @ToString
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class Edge {

        private String source;

        private String target;
    }
}
